package laboration.one.pack;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class Laboration1Activity extends Activity {
	
	private int m_counter;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        if (savedInstanceState != null)
        	m_counter = savedInstanceState.getInt("Counter");
        
        m_counter++;
        
        Log.d("Counter equals", String.valueOf(m_counter));
    }
    
    @Override
    protected void onPause() {
    	// TODO Auto-generated method stub
    	super.onPause();
    	
    	
    }
    
    @Override
    protected void onSaveInstanceState(Bundle outState) {
    	// TODO Auto-generated method stub
    	super.onSaveInstanceState(outState);
    	
    	outState.putInt("Counter", m_counter);
    }
}